Aiming method and device for shooting game

ABSTRACT

The present invention relates to an aiming method for a shooting game, which is applied to a mobile terminal having a touch display screen. The method comprises the following steps: a positioning step, acquiring a current rotation angle of a virtual camera when the mobile terminal is in a game interface; a rotation step, acquiring a coordinate position of a contact object when detecting that there is contact on the game interface, so that the current rotation angle of the virtual camera matches the coordinate position; and an adjusting step, acquiring a corresponding waggle angle via a sensor of the mobile terminal when detecting that the mobile terminal is waggling, so that the current rotation angle of the virtual camera matches the waggle angle. The present invention further relates to an aiming device for a shooting game.

TECHNICAL FIELD

The present invention relates to an aiming technique in a mobile gameand, in particular, to an aiming method and device for a shooting gameon a mobile touch-screen terminal.

BACKGROUND

The mobile game is an electronic game service that a user operates on amobile touch-screen terminal, e.g., a platform such as a mobile phone, atablet computer, via a mobile communication network, which comprises achess and card game, a role-playing game, a strategy game, an actiongame, etc. At present, the shooting game, as one of the action games,typically uses the following solution to implement aiming and shootingby means of a virtual camera: a double-joystick operation solution thatis used by both the mainstream FPS (e.g., the Modern Warfare series) andTPS (e.g., the Frontline Commando series) on a mobile touch-screenterminal at present. Such a solution is to simulate two joysticks on atouch screen, the left joystick controlling the movement of a target andthe right joystick controlling a lens of the virtual camera to aim andshoot. This solution seems reasonable, but actually is not ergonomic:

-   -   firstly, the right joystick is used to replace mouse operation,        meaning that a series of complex, fine and fast operations that        can only be completed with the entire arm previously are        required to be completed entirely by the right thumb, which will        bring great difficulties to the player during steering and        aiming and cause the result to be riddled with errors; and    -   secondly, a virtual joystick cannot provide feedback to a hand        of the player like a real joystick or a mouse, and thus the user        needs to perform observation and calibration with his/her own        eyes for any operation, which further increase the difficulty of        the operation.

The above two points may increase user experience frustration during thegame and decrease the overall perception, so that the FPS and the TPS onthe mobile touch-screen apparatus has narrow audience and is difficultto develop, and thus is far from the market effect that should beobtained.

SUMMARY OF THE INVENTION

In view of the disadvantages in the prior art, an objective of thepresent invention is intended to provide an aiming method for a shootinggame, which facilitates accurate steering and aiming of a virtual cameraand can also effectively improve the game experience.

In order to achieve the above objective, the present invention adoptsthe following technical solution:

An aiming method for a shooting game, which is applied to a mobileterminal having a touch display screen, characterized in that the aimingmethod comprises the following steps:

-   -   a positioning step: acquiring a current rotation angle of a        virtual camera when the mobile terminal is in a game interface;    -   a rotation step: acquiring a coordinate position of a contact        object when detecting that there is contact on the game        interface, so that the current rotation angle of the virtual        camera matches the coordinate position; and    -   an adjusting step: acquiring a corresponding waggle angle via a        sensor of the mobile terminal when detecting that the mobile        terminal is waggling, so that the current rotation angle of the        virtual camera matches the waggle angle.

Preferably, the rotation step comprises the following sub-steps:

-   -   an object determination step: when detecting that there is        contact on the game interface, detecting all list objects that        are in a touch state, obtaining a list object that is in a game        interface clicking state and denoting same as the contact        object, and acquiring the coordinate position of the contact        object;    -   an auxiliary step: creating, according to an auxiliary function,        an auxiliary ray with a near clip plane of the virtual camera as        a start point and passing through the coordinate position, and        acquiring a rotation angle of the auxiliary ray;    -   an increment determination step: obtaining an intermediate        interpolation between the current rotation angle of the virtual        camera and the rotation angle of the auxiliary ray by means of a        cyclical function;    -   an increment application step: applying the intermediate        interpolation to the virtual camera, so that an amplitude of        rotation of the virtual camera is equal to the intermediate        interpolation, and recording a rotation angle of the virtual        camera after a rotation; and    -   a judgment step: if the rotation angle of the virtual camera        after the rotation matches the rotation angle of the auxiliary        ray, completing a preliminary movement of the virtual camera;        otherwise, returning to the increment determination step.

Preferably, the sensor in the adjusting step is a gyroscope, wherein, bystarting the gyroscope, a gravity parameter value of the gyroscope isacquired to control the rotation angle of the virtual camera.

Preferably, the sensor in the adjusting step is a gravity sensor,wherein, by starting the gravity sensor, an acceleration value of thegravity sensor is acquired in real time; and an angle variation of theacceleration value generated per second is judged, and if the anglevariation exceeds a preset threshold, the rotation angle of the virtualcamera is controlled according to the angle variation after therotation.

Preferably, the acceleration value is a three-dimensional vector valuewhich is constituted by an X-axis acceleration value, a Y-axisacceleration value and a Z-axis acceleration value, wherein themagnitudes of the X-axis acceleration value, the Y-axis accelerationvalue and the Z-axis acceleration value all range from −1 to 1.

The present invention further proposes an aiming device for a shootinggame, which comprises the following modules:

-   -   a positioning module for acquiring a current rotation angle of a        virtual camera when the mobile terminal is in a game interface;    -   a rotation module for acquiring a coordinate position of a        contact object when detecting that there is contact on the game        interface, so that the current rotation angle of the virtual        camera matches the coordinate position; and    -   an adjusting module for acquiring a corresponding waggle angle        via a sensor of the mobile terminal when detecting that the        mobile terminal is waggling, so that the current rotation angle        of the virtual camera matches the waggle angle.

Preferably, the rotation module comprises the following sub-modules:

-   -   an object determination module for, when detecting that there is        contact on the game interface, detecting all list objects that        are in a touch state, obtaining a list object that is in a game        interface clicking state and denoting same as the contact        object, and acquiring the coordinate position of the contact        object;    -   an auxiliary module for creating, according to an auxiliary        function, an auxiliary ray with a near clip plane of the virtual        camera as a start point and passing through the coordinate        position, and acquiring a rotation angle of the auxiliary ray;    -   an increment determination module for obtaining an intermediate        interpolation between the current rotation angle of the virtual        camera and the rotation angle of the auxiliary ray by means of a        cyclical function;    -   an increment application module for applying the intermediate        interpolation to the virtual camera, so that an amplitude of        rotation of the virtual camera is equal to the intermediate        interpolation, and recording a rotation angle of the virtual        camera after a rotation; and    -   a judgment module for, if the rotation angle of the virtual        camera after the rotation matches the rotation angle of the        auxiliary ray, completing a preliminary movement of the virtual        camera; otherwise, returning to the increment determination        module.

Preferably, the sensor in the adjusting module is a gyroscope, wherein,by starting the gyroscope, a gravity parameter value of the gyroscope isacquired to control the rotation angle of the virtual camera.

Preferably, the sensor in the adjusting module is a gravity sensor,wherein, by starting the gravity sensor, an acceleration value of thegravity sensor is acquired in real time; and an angle variation of theacceleration value generated per second is judged, and if the anglevariation exceeds a preset threshold, the rotation angle of the virtualcamera is controlled according to the angle variation after therotation.

Preferably, the acceleration value is a three-dimensional vector valuewhich is constituted by an X-axis acceleration value, a Y-axisacceleration value and a Z-axis acceleration value, wherein themagnitudes of the X-axis acceleration value, the Y-axis accelerationvalue and the Z-axis acceleration value all range from −1 to 1.

The beneficial effects of the present invention are as follows: themethod facilitates accurate steering and aiming of the virtual camera,and can also effectively improve the player's experience of the game;and the present solution employs a way of combining a touch-screen and agravity sensor or a gyroscope, that is, a preliminary rotation of avirtual camera is collimated after a contact object is detected, and arotation angle of the virtual camera is adjusted accurately via thegravity sensor or the gyroscope, thereby facilitating the accurateaiming of the virtual camera at the contact object, and furtherimproving the player experience during the game.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a flow chart of a preferred implementation of an aiming methodfor a shooting game of the present invention.

FIG. 2 is a flow chart of a preferred implementation of a rotation stepin an aiming method for a shooting game of the present invention.

DETAILED DESCRIPTION

The present invention will be further described below in conjunctionwith the drawings and the particular embodiments.

Please refer to FIG. 1, the present embodiment relates to an aimingmethod for a shooting game, which is applied to a mobile terminal havinga touch display screen, the aiming method comprising the followingsteps:

A positioning step S1: acquiring a current rotation angle of a virtualcamera when the mobile terminal is in a game interface. The virtualcamera is an “eye” of a player in a 3D game and a scene photographed bythe virtual camera is a scene that the player sees on the screen, therebeing only one unique virtual camera in one scene throughout the game.The current rotation angle of the virtual camera is a quaternion,wherein the quaternion can be seen as a four-dimensional vector forrepresenting the rotation of an object in a space.

A rotation step S2: acquiring a coordinate position of a contact objectwhen detecting that there is contact on the game interface, so that thecurrent rotation angle of the virtual camera matches the coordinateposition. In particular, this is a step of coarsely adjusting theposition of a front sight during the game, that is, once detecting thatthere is contact in the game interface, the virtual camera rotates andaligns with a range where there is contact, so that the range wherethere is contact can be displayed on a preset position on the touchdisplay screen of the mobile terminal, wherein the preset position canbe the center of the screen. This step can be implemented by clickingthe touch-screen, corresponding to the operation in which the playerrapidly slides a mouse with his/her shoulder and elbow, steers andapproximately aims at the target in a keyboard-mouse FPS, therebycompleting the operation of a large rotation of the virtual camera, andat this time, the rotation angle is always greater than 10 degrees, andalso, the rotation angle of the large rotation of the virtual camera isgreater than how many degrees can certainly be set according to theactual conditions.

An adjusting step S3: acquiring a corresponding waggle angle via asensor of the mobile terminal when detecting that the mobile terminal iswaggling, so that the current rotation angle of the virtual cameramatches the waggle angle. In particular, this is a step of finelyadjusting the position of the front sight during the game, and when thecontact range in the game is displayed at the preset position on thetouch display screen of the mobile terminal, accurate aiming is achievedwith a sensor. This step can be implemented by waggling the mobileterminal and via the sensor, corresponding to the operation in which theplayer gently moves the mouse with his/her wrist and aims at the head ofthe target in the keyboard-mouse FPS, thereby completing the operationof a slight rotation of the virtual camera, and at this time, therotation angle is always smaller than 5 degrees, and also, the rotationangle of the slight rotation of the virtual camera is smaller than howmany degrees can certainly be set according to the actual conditions.

As shown in FIG. 2, the rotation step S2 may comprise the followingsub-steps:

An object determination step S2 a: when clicking the game interface,detecting all list objects that are in a touch state, obtaining a listobject that is in a game interface clicking state and denoting same asthe contact object, and acquiring the coordinate position,touchPosition, of the contact object.

An auxiliary step S2 b: creating, according to an auxiliary function, anauxiliary ray, Ray, with a near clip plane of the virtual camera as astart point and passing through the coordinate position, touchPosition,and acquiring a rotation angle, touchQ, of the auxiliary ray, Ray. Thisauxiliary function can be a Unity function, ScreenPointToRay.

An increment determination step S2 c: obtaining an intermediateinterpolation, lerpQ, between the current rotation angle of the virtualcamera and the rotation angle, touchQ, of the auxiliary ray by means ofa cyclical function. This cyclical function can be any one of an Update,FixedUpdate, InvokeRepeating function and a coroutine while function.The intermediate interpolation, lerpQ, is a quaternion which continuallygets closer to the direction of the auxiliary ray, because a quaternionis a four-dimensional vector that can be normalized and is suitable forvarious types of interpolations, such as a linear interpolationalgorithm: q(t)=(1−t)q1+t q2/∥(1−t)q1+tq2∥. For more information,reference can be made to “Research and Application of Smooth Rotation onthe Role in the Game Use of Quaternion Interpolation Algorithm” by ZhengJun, YINSHAN ACADEMIC JOURNAL (NATURAL SCIENCE), no. 1, 2012.

An increment application step S2 d: applying the intermediateinterpolation, lerpQ, to the virtual camera, so that an amplitude ofrotation of the virtual camera is equal to the intermediateinterpolation, lerpQ, and recording a rotation angle of the virtualcamera after a rotation.

A judgment step S2 e: if the rotation angle of the virtual camera afterthe rotation matches the rotation angle of the auxiliary ray, completinga preliminary movement of the virtual camera, with the rotation angle ofthe virtual camera being consistent with the rotation angle of theauxiliary ray, Ray at this time; otherwise, returning to the incrementdetermination step S2 c.

Preferably, the sensor in the adjusting step can be a gyroscope,wherein, by starting the gyroscope, a gravity parameter value of thegyroscope is acquired to control the rotation angle of the virtualcamera.

In particular, the values of a gravity parameter on the X-axis and theY-axis are acquired after the gyroscope is started, and the values onthe X-axis and the Y-axis are multiplied by a certain amplificationfactor coefficient, that is, the acquired values on the X-axis and theY-axis are used as a basic value, the amplification factor coefficientof this basic value is pre-defined; a setting is customized that, thegreater the amplification factor coefficient is, the greater theamplitude of rotation of the virtual camera is; and the amplified valueson the X-axis and the Y-axis are used as an Euler angle of thequaternion and applied to the virtual camera. The gyroscope determinesthat a numerical value of the spatial attitude of the object is varyingcontinuously along with the rotation of the object, and the values ofthe gravity parameter on the X-axis and the Y-axis continually obtainedare multiplied by the customized amplification factor so as to obtain afinal rotation angle of the virtual camera required to be obtained.

Certainly, the sensor in the adjusting step may be a gravity sensor andmay also be other sensors that are able to acquire the correspondingwaggle angle. In the adjusting step, by starting the gravity sensor, anacceleration value of the gravity sensor is acquired in real time; andan angle variation of the acceleration value generated per second isjudged, if the angle variation exceeds a preset threshold, the rotationangle of the virtual camera is controlled according to the anglevariation after the rotation. Furthermore, the acceleration value is athree-dimensional vector value which is constituted by an X-axisacceleration value, a Y-axis acceleration value and a Z-axisacceleration value, wherein the magnitudes of the X-axis accelerationvalue, the Y-axis acceleration value and the Z-axis acceleration valueall range from −1 to 1.

In particular, the acceleration value of the gravity sensor in themobile terminal can be acquired in real time according toInput.acceleration, this acceleration value being a three-dimensionalvector, wherein the magnitude of the numerical value on the X-axisranges from −1 to 1, the magnitude of the numerical value on the Y-axisranges from −1 to 1, and the magnitude of the numerical value on theZ-axis ranges from −1 to 1. The particular principle thereof is asfollows: put a mobile phone flat with the front face facing up, andaccording to the right hand rule, put the right hand out with the palmfacing up, close together four fingers so that they get perpendicular tothe thumb, wherein a direction indicated by the thumb is the X-axis onwhich the value is a three-dimensional vector (0, 0, 0), a directionindicated by the four fingers is the Y-axis on which the value is athree-dimensional vector (0, 0, 0) and a direction which isperpendicular to the palm and goes upwards is the Z-axis on which thevalue is a three-dimensional vector (0, 0, −1); and when the mobileterminal is rotated, assuming that there is a vector which is verticaldownwards, then the values on the X-axis, the Y-axis and the Z-axis arerespectively compared to this vector, when the directions areconsistent, we get 1, when the directions are opposite, we get −1, andwhen the directions are perpendicular, 0.

The changed numerical values on the X-axis and the Y-axis are multipliedby a pre-defined coefficient and then applied to the values on theX-axis and the Y-axis of the Euler angle in the quaternion, so as toobtain a quaternion and it is assumed that the name is defined as accQ.That is, a three-dimensional vector is continuously obtained accordingto different spatial attitudes of the mobile terminal, and thisthree-dimensional vector also changes continuously when the mobileterminal is rotated, e.g., the value on the X-axis changes 0.1, thevalue on the Y-axis changes 0.2, then a three-dimensional vector (0.1,0.2, 0) is used for representation. The pre-defined coefficient is howmany degrees the rotation changes during a unit time, i.e.degrees/second, for example, it can be pre-defined that the rotationchanges 5 degrees each time the value on the X-axis changes 0.1, thatis, the greater the pre-defined coefficient is, the greater theamplitude of rotation of the virtual camera is when the pre-definedcoefficient is applied to the virtual camera.

An included angle between a real-time quaternion accQ and a previousquaternion accQ thereof is calculated, and the real-time quaternion accQis applied only when the included angle is greater than a presetthreshold. In particular, when judging whether the included angle isgreater than the preset threshold, a rotation angle lastQ can beobtained according to the real-time quaternion accQ and the previousquaternion accQ thereof, 1 degree being approximately 0.0174533 radiansaccording to angle and radian conversion, and the radian of lastQ iscompared to 0.0174533, if lastQ is greater than 0.0174533, then lastQ isconsidered to be greater than the preset threshold.

The Euler angle of the quaternion accQ is applied to the camera, and thecamera is rotationally moved along with the spatial attitude of themobile terminal, so as to complete the process of accurately aiming atthe contact object. In particular, a quaternion is a four-dimensionalvector (x, y, z, w). An operation such as rotation of a spatial objectis implemented with a 4×4 matrix, and we cannot simply take a rotationangle to a vector. An Euler angle is a three-dimensional vector (x, y,z) representing rotation angles on the X-axis, the Y-axis and theZ-axis, and if the rotation angles on the X-axis and the Y-axis aretaken, transformation from a quaternion to an Euler angle can beimplemented, e.g. encapsulated as Quaternion.eulerAngles in a unity.

The present embodiment further proposes an aiming device for a shootinggame, which comprises the following modules:

-   -   a positioning module for acquiring a current rotation angle of a        virtual camera when the mobile terminal is in a game interface;    -   a rotation module for acquiring a coordinate position of a        contact object when detecting that there is contact on the game        interface, so that the current rotation angle of the virtual        camera matches the coordinate position; and    -   an adjusting module for acquiring a corresponding waggle angle        via a sensor of the mobile terminal when detecting that the        mobile terminal is waggling, so that the current rotation angle        of the virtual camera matches the waggle angle.

Preferably, the rotation module comprises the following sub-modules:

-   -   an object determination module for, when clicking the game        interface, detecting all list objects that are in a touch state,        obtaining a list object that is in a game interface clicking        state and denoting same as the contact object, and acquiring the        coordinate position of the contact object;    -   an auxiliary module for creating, according to an auxiliary        function, an auxiliary ray with a near clip plane of the virtual        camera as a start point and passing through the coordinate        position, and acquiring a rotation angle of the auxiliary ray;    -   an increment determination module for obtaining an intermediate        interpolation between the current rotation angle of the virtual        camera and the rotation angle of the auxiliary ray by means of a        cyclical function;    -   an increment application module for applying the intermediate        interpolation to the virtual camera, so that an amplitude of        rotation of the virtual camera is equal to the intermediate        interpolation, and recording a rotation angle of the virtual        camera after a rotation; and    -   a judgment module for, if the rotation angle of the virtual        camera after the rotation matches the rotation angle of the        auxiliary ray, completing a preliminary movement of the virtual        camera; otherwise, returning to the increment determination        module.

Preferably, the sensor in the adjusting module is a gyroscope, wherein,by starting the gyroscope, a gravity parameter value of the gyroscope isobtained to control the rotation angle of the virtual camera.

Preferably, the sensor in the adjusting module is a gravity sensor,wherein, by starting the gravity sensor, an acceleration value of thegravity sensor is acquired in real time; and an angle variation of theacceleration value generated per second is judged, and if the anglevariation exceeds a preset threshold, the rotation angle of the virtualcamera is controlled according to the angle variation after therotation.

Preferably, the acceleration value is a three-dimensional vector valuewhich is constituted by an X-axis acceleration value, a Y-axisacceleration value and a Z-axis acceleration value, wherein themagnitudes of the X-axis acceleration value, the Y-axis accelerationvalue and the Z-axis acceleration value all range from −1 to 1.

For a person skilled in the art, various other corresponding changes andmodifications can be made according to the technical solutions andconcepts described above, and all of these changes and modificationsshould fall within the scope of the claims of the present invention.

What is claimed is:
 1. An aiming method for a shooting game, which isapplied to a mobile terminal having a touch display screen, wherein theaiming method comprises the following steps: a positioning step:acquiring a current rotation angle of a virtual camera when the mobileterminal is in a game interface; a rotation step: acquiring a coordinateposition of a contact object when detecting that there is contact on thegame interface, so that the current rotation angle of the virtual cameramatches the coordinate position; and an adjusting step: acquiring acorresponding waggle angle via a sensor of the mobile terminal whendetecting that the mobile terminal is waggling, so that the currentrotation angle of the virtual camera matches the waggle angle.
 2. Theaiming method for a shooting game of claim 1, wherein the rotation stepcomprises the following sub-steps: an object determination step: whendetecting that there is contact on the game interface, detecting alllist objects that are in a touch state, obtaining a list object that isin a game interface clicking state and denoting same as the contactobject, and acquiring the coordinate position of the contact object; anauxiliary step: creating, according to an auxiliary function, anauxiliary ray with a near clip plane of the virtual camera as a startpoint and passing through the coordinate position, and acquiring arotation angle of the auxiliary ray; an increment determination step:obtaining an intermediate interpolation between the current rotationangle of the virtual camera and the rotation angle of the auxiliary rayby means of a cyclical function; an increment application step: applyingthe intermediate interpolation to the virtual camera, so that anamplitude of rotation of the virtual camera is equal to the intermediateinterpolation, and recording a rotation angle of the virtual cameraafter a rotation; and a judgment step: if the rotation angle of thevirtual camera after the rotation matches the rotation angle of theauxiliary ray, completing a preliminary movement of the virtual camera;otherwise, returning to the increment determination step.
 3. The aimingmethod for a shooting game of claim 1, wherein the sensor in theadjusting step is a gyroscope, wherein, by starting the gyroscope, agravity parameter value of the gyroscope is acquired to control therotation angle of the virtual camera.
 4. The aiming method for ashooting game of claim 1, wherein the sensor in the adjusting step is agravity sensor, wherein, by starting the gravity sensor, an accelerationvalue of the gravity sensor is acquired in real time; and an anglevariation of the acceleration value generated per second is judged, andif the angle variation exceeds a preset threshold, the rotation angle ofthe virtual camera is controlled according to the angle variation afterthe rotation.
 5. The aiming method for a shooting game of claim 4,wherein the acceleration value is a three-dimensional vector value whichis constituted by an X-axis acceleration value, a Y-axis accelerationvalue and a Z-axis acceleration value, wherein the magnitudes of theX-axis acceleration value, the Y-axis acceleration value and the Z-axisacceleration value all range from −1 to
 1. 6. An aiming device for ashooting game, which is applied to a mobile terminal having a touchdisplay screen, wherein the aiming device comprises the followingmodules: a positioning module for acquiring a current rotation angle ofa virtual camera when the mobile terminal is in a game interface; arotation module for acquiring a coordinate position of a contact objectwhen detecting that there is contact on the game interface, so that thecurrent rotation angle of the virtual camera matches the coordinateposition; and an adjusting module for acquiring a corresponding waggleangle via a sensor of the mobile terminal when detecting that the mobileterminal is waggling, so that the current rotation angle of the virtualcamera matches the waggle angle.
 7. The aiming device for a shootinggame of claim 6, wherein the rotation module comprises the followingsub-modules: an object determination module for, when detecting thatthere is contact on the game interface, detecting all list objects thatare in a touch state, obtaining a list object that is in a gameinterface clicking state and denoting same as the contact object, andacquiring the coordinate position of the contact object; an auxiliarymodule for creating, according to an auxiliary function, an auxiliaryray with a near clip plane of the virtual camera as a start point andpassing through the coordinate position, and acquiring a rotation angleof the auxiliary ray; an increment determination module for obtaining anintermediate interpolation between the current rotation angle of thevirtual camera and the rotation angle of the auxiliary ray by means of acyclical function; an increment application module for applying theintermediate interpolation to the virtual camera, so that an amplitudeof rotation of the virtual camera is equal to the intermediateinterpolation, and recording a rotation angle of the virtual cameraafter a rotation; and a judgment module for, if the rotation angle ofthe virtual camera after the rotation matches the rotation angle of theauxiliary ray, completing a preliminary movement of the virtual camera;otherwise, returning to the increment determination module.
 8. Theaiming device for a shooting game of claim 6, wherein the sensor in theadjusting module is a gyroscope, wherein, by starting the gyroscope, agravity parameter value of the gyroscope is acquired to control therotation angle of the virtual camera.
 9. The aiming device for ashooting game of claim 6, wherein the sensor in the adjusting module isa gravity sensor, wherein, by starting the gravity sensor, anacceleration value of the gravity sensor is acquired in real time; andan angle variation of the acceleration value generated per second isjudged, and if the angle variation exceeds a preset threshold, therotation angle of the virtual camera is controlled according to theangle variation after the rotation.
 10. The aiming device for a shootinggame of claim 9, wherein the acceleration value is a three-dimensionalvector value which is constituted by an X-axis acceleration value, aY-axis acceleration value and a Z-axis acceleration value, wherein themagnitudes of the X-axis acceleration value, the Y-axis accelerationvalue and the Z-axis acceleration value all range from −1 to 1.